﻿using System.Web;
using Ninject;
using Ninject.Modules;
using NormActiveRecord;
using NormActiveRecord.Storage;
using NormActiveRecord.Storage.MongoDB;

namespace Kazuku.Core {
	public class NinjectBindings : NinjectModule {
		public override void Load() {
			Bind<IModelFactory>().To<ModelFactory>().InRequestScope();
			Bind<IDataStore>().To<MongoDataStore>().InRequestScope();
			Bind<IKernel>().ToConstant(Global.Container);
			//Bind<HttpContextBase>().ToMethod(ctx => new HttpContextWrapper(HttpContext.Current)).InRequestScope(); // this is bound in Ninject.Web.Mvc
		}
	}
}